package com.chenyun.boot.web.feign;

import com.chenyun.common.constants.AppConstans;
import com.chenyun.common.service.IBaseFeignService;
import com.chenyun.common.vo.BusMessageVO;
import com.chenyun.common.vo.ServiceResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = AppConstans.APPLICATION_SOCKET_NAME, path = AppConstans.AppContextPath.SOCKET_PATH)
public interface SocketMsgFeign extends IBaseFeignService {

    /**
     * 推送消息到websocket
     * @param pack 消息体 
     * @return
     */
    @PostMapping("/msg/send")
    public ServiceResponse sendMsg(@RequestBody BusMessageVO pack);

}
